package com.jrx.anytxn.param.mapper.ext;

import com.jrx.anytxn.common.annotation.ParamTuningAnnotation;
import com.jrx.anytxn.param.entity.RmAviatorRuleInfoWithBLOBs;
import com.jrx.anytxn.param.mapper.base.RmAviatorRuleInfoMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * 规则的接口扩展
 * @author
 */
public interface ExtRmAviatorRuleInfoMapper extends RmAviatorRuleInfoMapper {

    List<RmAviatorRuleInfoWithBLOBs> selectPageByRuleType(RmAviatorRuleInfoWithBLOBs record);

    List<RmAviatorRuleInfoWithBLOBs> selectByIdOrRuleTypeRule(RmAviatorRuleInfoWithBLOBs record);

    List<RmAviatorRuleInfoWithBLOBs> selectByIdAndTenIdAndType(RmAviatorRuleInfoWithBLOBs record);

    int deleteByIdOrRuleType(RmAviatorRuleInfoWithBLOBs record);

    @ParamTuningAnnotation
    int deleteByIdAndTenId(@Param("id") Long id,@Param("tenantId") String tenantId);

    @ParamTuningAnnotation
    int updateByOIdAndTenId(RmAviatorRuleInfoWithBLOBs aviatorRuleInfoWithBLOBs);

    /**
     * 根据字段是否为空保存
     * @param record RmAviatorRuleInfoWithBLOBs
     * @return int
     */
    int extInsertSelective(RmAviatorRuleInfoWithBLOBs record);

    RmAviatorRuleInfoWithBLOBs selectByIdAndTenId(@Param("id") Long id,@Param("tenantId") String tenantId);

}
